// TestThread.cpp : implementation file
//

#include "stdafx.h"
#include "TestWinThread.h"
#include "TestThread.h"

#ifdef _DEBUG
#define new DEBUG_NEW
#undef THIS_FILE
static char THIS_FILE[] = __FILE__;
#endif

/////////////////////////////////////////////////////////////////////////////
// CTestThread

IMPLEMENT_DYNCREATE(CTestThread, CWinThread)

CTestThread::CTestThread()
{
}

CTestThread::~CTestThread()
{
}

BOOL CTestThread::InitInstance()
{
	// TODO:  perform and per-thread initialization here
	return TRUE;
}

int CTestThread::ExitInstance()
{
	// TODO:  perform any per-thread cleanup here
	return CWinThread::ExitInstance();
}

BEGIN_MESSAGE_MAP(CTestThread, CWinThread)
	//{{AFX_MSG_MAP(CTestThread)
		// NOTE - the ClassWizard will add and remove mapping macros here.
	//}}AFX_MSG_MAP
END_MESSAGE_MAP()

/////////////////////////////////////////////////////////////////////////////
// CTestThread message handlers

int CTestThread::Run() 
{
	// TODO: Add your specialized code here and/or call the base class
	CString msg;
	msg.Format("Gia tri cua N: %d",m_N);
	MessageBox(NULL,msg,"Thread",MB_OK);
	return CWinThread::Run();
}

void CTestThread::TruyenN(int n)
{
	m_N = n;
}
